/* **********************************************************
 * Copyright 2010 Dimitar Vangelovski
 *
 * This file is part of the Gens3 3D Engine.
 * 
 * The Gens3 3D Engine is free software; you can redistribute it and/or
 * modify it under the terms of version 2 of the GNU General Public
 * License as published by the Free Software Foundation.
 * 
 * The Gens3 3D Engine is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 * General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with the Gens3 3D Engine; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 * 02110-1301, USA
 * **********************************************************/


#pragma once

#include <string>
#include <vector>

class CMaterial;
class CGeomObject;
class CLightObject;
class CAnimObject;

class CScene
{
public:

	CScene();
	CScene(const CScene &other);
	CScene(std::string strSceneFilename, unsigned int nMaterialCount, unsigned int nGeomObjectCount, unsigned int nLightObjectCount);
	~CScene();

	void		SetGeomObject(int nPos, CGeomObject * pGeomObj) { m_GeomObjects[nPos] = pGeomObj; }
	void		SetGeomObjects(std::vector<CGeomObject *> &other) { m_GeomObjects = other; }
	void		SetMaterial(int nPos, CMaterial * pMat) { m_Materials[nPos] = pMat; }
	void		SetMaterials(std::vector<CMaterial *> &other) { m_Materials = other; }
	void		SetLightObject(int nPos, CLightObject * pLightObj) { m_LightObjects[nPos] = pLightObj; }
	void		SetLightObjects(std::vector<CLightObject *> &other) { m_LightObjects = other; }
	void		SetAnimObjects(std::vector<CAnimObject *> &other) { m_AnimObjects = other; }
	void		SetSceneFilename(std::string strFilename) { m_strSceneFilename = strFilename; }
	void		SetMaterialCount(unsigned int iMaterialCount) { m_nMaterialCount = iMaterialCount; }
	void		SetGeomObjectCount(unsigned int iGeomObjCount) { m_nGeomObjectCount = iGeomObjCount; }
	void		SetLightObjectCount(unsigned int iLightObjCount) { m_nLightObjectCount = iLightObjCount; }

	void		InsertGeomObject (CGeomObject * pGeomObj) { m_GeomObjects.push_back(pGeomObj); }
	void		InsertMaterial(CMaterial * pMat) { m_Materials.push_back(pMat); }
	void		InsertLightObject(CLightObject * pLightObj) { m_LightObjects.push_back(pLightObj); }
	void		InsertAnimObject(CAnimObject * pAnimObj) { m_AnimObjects.push_back(pAnimObj); }

	CGeomObject *			GetGeomObject(int nPos) const { return m_GeomObjects[nPos]; }
	std::vector<CGeomObject *>	GetGeomObjects() const { return m_GeomObjects; }
	CMaterial *			GetMaterial(int nPos) const { return m_Materials[nPos]; }
	std::vector<CMaterial *>	GetMaterials() const { return m_Materials; }
	CLightObject *			GetLightObject(int nPos) const { return m_LightObjects[nPos]; }
	std::vector<CLightObject *>	GetLightObjects() const { return m_LightObjects; }
	std::vector<CAnimObject *>	GetAnimObjects() const { return m_AnimObjects; }
	std::string			GetSceneFilename() const { return m_strSceneFilename; }
	unsigned int			GetMaterialCount() const { return m_nMaterialCount; }
	unsigned int			GetGeomObjectCount() const { return m_nGeomObjectCount; }
	unsigned int			GetLightObjectCount() const { return m_nLightObjectCount; }

private:
	std::string			m_strSceneFilename;
	std::vector<CMaterial *>	m_Materials;
	std::vector<CLightObject *>	m_LightObjects;
	std::vector<CGeomObject *>	m_GeomObjects;
	std::vector<CAnimObject *>	m_AnimObjects;
	unsigned int			m_nMaterialCount;
	unsigned int			m_nGeomObjectCount;
	unsigned int			m_nLightObjectCount;
};
